package com.yan.dao;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

//等价于<bean id="user" class="com.yan.pojo.User"/>
@Component
@Scope("prototype")
public class User {
    //相当于<property name="name" value="子言"
    @Value("子言")

    public String name;
}
